﻿/*****************************************
 * 
 *  copyright (c) by ylshen
 * 
 *  author : ylshen (syl.lucky@gmail.com)
 * 
 **************************************** */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JYStockAnalyser.Model
{
    /// <summary>
    /// 安全性排序项
    /// </summary>
    [Serializable]
    public class SecurityOrderItem
    {
        /// <summary>
        /// 序号
        /// </summary>
        public int Order { get; set; }
        /// <summary>
        /// 股票代码
        /// </summary>
        public string StockNO { get; set; }
        /// <summary>
        /// 股票名称
        /// </summary>
        public string StockName { get; set; }
        /// <summary>
        /// 现价
        /// </summary>
        public decimal CurrentPrice { get; set; }
        /// <summary>
        /// 内在价值
        /// </summary>
        public decimal InsidePrice { get; set; }
        /// <summary>
        /// 上涨空间
        /// </summary>
        public decimal Growth { get; set; }

        /// <summary>
        /// 现价字符串
        /// </summary>
        public string CurrentPriceString
        {
            get
            {
                return CurrentPrice == GuideLine.UNDEFINED_VALUE ? "-" : CurrentPrice.ToString("0.00");
            }
        }

        /// <summary>
        /// 上涨空间字符串
        /// </summary>
        public string GrowthString
        {
            get
            {
                return FinancialCalculator.GetPercentString(Growth);
            }
        }
    }
}
